<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <div th:replace="~{common::css}"></div>
    <title>搜索结果</title>
</head>
<body class="m-about">
<!--导航-->
<div th:replace="~{common::topbar(n=0)}"></div>
<!--中间内容-->
<div class="m-padded-tb-big m-container">
    <div class="ui container">
        <!--header-->
        <div class="ui top attached segment">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <h2 class="ui  teal header">搜索结果</h2>
                </div>
                <div class=" right aligned column">
                    共<h3 class="ui orange header m-inline-block m-text-thin" th:text="${page.getTotal()}"></h3>个
                </div>
            </div>
        </div>
        <!--分类条目-->

        <!--内容-->

            <div class="ui top attached teal   segment"   th:each="blog:${page.getList()}" th:fragment="blogList">
                <div class="ui  padded  vertical segment m-padded-tb-large m-mobile-clear" >
                    <div class="ui  mobile reversed stackable grid">
                        <div class="eleven wide column">
                            <!--文章内容-->
                            <h3 class="ui header " th:text="${blog.getTitle()}">你真正理解财富自由吗</h3>
                            <p class="m-text-thin m-text-spaced m-text-lined" th:text="${blog.getDescription()}"></p>
                            <div class="ui stackable grid">
                                <div class="eleven wider column">
                                    <div class="ui horizontal link list mini">
                                        <!--博客信息-->
                                        <div class="item">
                                            <!--头像-->
                                            <img src="../static/images/varter.jpg" th:src="@{${blog.getAvatar()}}" alt="" class="ui avatar image">
                                            <!--名字-->
                                            <div class="content"><a href="#" class="header" th:text="${blog.getAuthor()}">StephenCurry</a></div>
                                        </div>
                                        <!--更新时间-->
                                        <div class="item">
                                            <i class="calendar alternate outline icon"></i>   <a href="#" th:text="${#dates.format(blog.getCreateTime(),'yyyy-MM-dd')}">  </a>
                                        </div>
                                        <!--浏览次数-->
                                        <div class="item">
                                            <a href="#" ><i class="eye  icon" ></i>&nbsp;&nbsp;<span th:text="${blog.getViews()}"></span> </a>
                                        </div>
                                    </div>
                                </div>
                                <!--标签名字-->
                                <div class=" right aligned five wider column">
                                    <a href="" target="_blank" class="ui teal basic label m-padded-tb-tiny m-text-thin" th:text="${blog.getFlag()}">认知升级</a>
                                </div>
                            </div>
                        </div>
                        <!--图片-->
                        <div class="five wide column">
                            <a th:href="@{/toBlog/{id}(id=${blog.getId()})}" target="_blank">
                                <img src="../static/images/blog.jpg" th:src="@{${blog.getFirstPicture()}}" alt="" class="ui rounded image">
                            </a>
                        </div>
                    </div>
                </div>
            </div>


            <!--上面是主内容-->
            <div class="ui bottom attached segment">
                <div class="ui middle aligned two column grid">
                    <div class="column" th:if="${page.hasPreviousPage}">
                        <a th:href="@{/search(pageNum=${page.getPageNum()-1},quarry=${quarry})}" class="ui  mini teal basic button" >上一页</a>

                    </div>

                    <div class=" right aligned column" th:if="${page.hasNextPage}">
                        <a th:href="@{/search(pageNum=${page.getPageNum()+1},quarry=${quarry})}" class="ui  mini teal basic button">下一页</a>
                    </div>

                </div>
                <p class="m-text-spaced" >当前第<span th:text="${page.getPageNum()}"></span>页 共<span th:text="${page.getPages()}"></span>页，
                    共<span th:text="${page.total}" class="m-text-lined"></span>条记录</p>
            </div>
        </div>
    </div>

</div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/><br/>
<br/>
<br/>
<br/><br/>

<!--底部 footer-->
<div th:replace="~{common::footer}"></div>


<script src="../static/js/jquery-3.5.1.js" th:src="@{/js/jquery-3.5.1.js}"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
    <script>
        $('.menu.toggle').click(function (){
            $('.m-item').toggleClass('m-mobile-hide');

        });
        $('.ui.dropdown').dropdown({
            on : 'hover',
        });

    </script>
</body>

</html>